package com.itheima.controller.utils;

import lombok.Data;

@Data
public class R {

    private Boolean flag;/*标志*/
    private Object data;/*数据*/
    private String msg;/*消息*/

    /*返回状态*/
    public R(Boolean flag) {
        this.flag = flag;
    }

    /*返回数据，带状态*/
    public R(Boolean flag, Object data) {
        this.flag = flag;
        this.data = data;
    }

    public R(String msg) {
        this.flag = false;
        this.msg = msg;
    }

    public R(Boolean flag,String msg){
        this.flag=flag;
        this.msg=msg;
    }
}
